
const vueHidden = {
    install(Vue){
        Vue.directive("hidden",{
            inserted(el ,binding){
                const val = binding.value === undefined && true
                const hiddenExpression = val ? "hidden":"visible"
                el.style.visibility = hiddenExpression
            },
            updated(el , binding){
                const val = !!binding.value 
                const hiddenExpression = val ? "hidden":"visible"
                el.style.visibility = hiddenExpression
            }
        })
        
    }
}

export default vueHidden